package com.ztao.pojo;

import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

/**
 * @Date 2024/6/7 15:30
 * @Author
 **/
@Data
@Document("student")  //对应的是mongodb里面得集合的名字
public class Student {
    private String id;
    //mongo   name
    @Field("name")   // 映射关系
    private String name2;
    //mongo= age  prop=age
    private Integer age;
}